package com.win.controller.echarts;

import com.win.pojo.vo.EchartsInfoVo;
import com.win.service.EchartsService;
import com.win.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("echarts")
@CrossOrigin
public class EchartsController {

    @Autowired
    private EchartsService echartsService;


    @GetMapping("/getEchartsInfo")
    public Result<Map<String,List<EchartsInfoVo>>> getInfo(){
        Map<String, List<EchartsInfoVo>> map = echartsService.getEchartsInfo();
        return Result.ok(map);
    }

}
